<?php
session_start();
header('Content-Type:text/html;charset=utf-8');
require_once($_SERVER['DOCUMENT_ROOT'].'/public/func.php'); 
$config=require_once($_SERVER['DOCUMENT_ROOT'].'/public/config.php');
$_POST['mfile']=up('mfile');
$arr=array('account'=>$_POST['account'],'pwd'=>$_POST['pwd'],'pname'=>$_POST['pname'],'email'=>$_POST['email'],'mfile'=>$_POST['mfile'],'status'=>$_POST['status'],'ctime'=>$_POST['ctime']);
$rec=xiugai($config,'vip',"where id={$_POST['id']}",$arr);
if($rec){
  echo "<script>alert('编辑成功');window.location.href='/admin/vip/vip.php'</script>";
}else{
  echo $sql;die;
  echo "<script>alert('编辑失败');window.location.href='/admin/vip/vip.php'</script>";
}
?>